/*
 * Copyright 2007 Xplayat, S.L. All rights reserved.
 * Propiedad de Xplayat. 
 */
package es.xpt.ysf;

/**
  * This class implements an exception which can wrapped a lower-level exception.
  *
  */
 
@SuppressWarnings("serial")
public class YSFException extends Exception {
  public YSFException(Throwable e) {
    super (e);
  }
  
  private Object[] parameters = null;

/**
  * Creates a new YSFException wrapping another exception, and with a detail message.
  * @param code the detail message.
  * @param exception the wrapped exception.
  */
  public YSFException(String code, Throwable exception) {
    super(code, exception);
  }

/**
  * Creates a YSFException with the specified detail message.
  * @param code the detail message.
  */
  public YSFException(String code) {
	super(code);
  }

/**
 * Creates a ERPException with the specified detail message.
 * @param code the detail message.
 */
  public YSFException(String code,Object[] parameters) {
	super(code);
    this.parameters = parameters;
  }

/**
 * Creates a ERPException with the specified detail message.
 * @param code the detail message.
 */
  public YSFException(String code, Throwable exception, Object[] parameters) {
	super(code, exception);
    this.parameters = parameters;
  }


  public Object[] getParameters() {
    return parameters;
  }
}
